#include "stm32f10x.h"                  // Device header
#include "OLED.h"
#include "LED.h"
#include "PWM.h"
#include "Delay.h"
int main(void)
{
	OLED_Init();
	LED_Init();
	PWM_Init();
	OLED_ShowString(1,1,"Pulse:");
	while(1)
	{
		for (uint16_t i=0; i<=100; i++)
		{
			PWM_SetCompare1(i);
			Delay_ms(100);
			OLED_ShowNum(1,7,i,4);
		}
		for (uint16_t i=0; i<=100; i++)
		{
			PWM_SetCompare1(100-i);
			Delay_ms(10);
			OLED_ShowNum(1,7,100-i,4);
		}
	}
}
